from Q1 import sum_of_number

if __name__ == "__main__":
    counts = [0] * 9
    for i in range(1, 100000):
        counts[sum_of_number(i) - 1] += 1
    lines = ["", ""]
    for i in range(9):
        lines[0] += "%5d "%i
        lines[1] += "%5d "%counts[i]
    print(lines[0] + "\n" + lines[1])